home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / inptmthd.sit / Input Methods / card_10994.txt < prev    next >
Text File  |  1989-11-24  |  7KB  |  324 lines

  1. -- card: 10994 from stack: in
  2. -- bmap block id: 11142
  3. -- flags: 0000
  4. -- background id: 2696
  5. -- name: Miscellaneous
  6. ----- HyperTalk script -----
  7.  
  8. -- Created by Bob Bockholt, Humanities Research Center, BYU
  9. -- (everything written by Bob is named "doit")
  10. on doit
  11.   global total
  12.  
  13.   if total < the number of card buttons then
  14.     set the hilite of the target to not the hilite of the target
  15.     put the number of target into k
  16.     if the hilite of target then add k to k
  17.     put 1 + (k mod the number of card buttons) into k
  18.     set the hilite of button k to not the hilite of button k
  19.  
  20.     if the number of the target is not k then
  21.       if the hilite of target
  22.       then add one to total
  23.     else subtract one from total
  24.     if the hilite of button k
  25.     then add one to total
  26.   else subtract one from total
  27. end if
  28.  
  29. if total = the number of card buttons then win
  30. else if cd fld score <= 0 then lose
  31. else subtract 10 from cd fld score
  32.  
  33. else
  34.   play boing
  35. end if
  36.  
  37. end doit
  38.  
  39. on win
  40.   hide cd fld lose
  41.   rightSound
  42. end win
  43.  
  44. on lose
  45.   wrongSound
  46. end lose
  47.  
  48. on closeCard
  49.   global total
  50.   lock screen
  51.   show cd fld lose
  52.   put zero into total
  53.   put 100 into cd fld score
  54.   repeat with i = 1 to the number of card buttons
  55.     set the hilite of card button i to false
  56.   end repeat
  57.   pass closeCard
  58. end closeCard
  59.  
  60.  
  61.  
  62.  
  63. -- part 1 (button)
  64. -- low flags: 00
  65. -- high flags: 8005
  66. -- rect: left=63 top=158 right=177 bottom=136
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 1
  70. -- font id: 0
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: One
  75. ----- HyperTalk script -----
  76. on mouseUp
  77.   doit
  78. end mouseUp
  79.  
  80.  
  81.  
  82. -- part 2 (button)
  83. -- low flags: 00
  84. -- high flags: 8005
  85. -- rect: left=63 top=177 right=196 bottom=136
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 0 / 0
  88. -- text alignment: 1
  89. -- font id: 0
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: Two
  94. ----- HyperTalk script -----
  95. on mouseUp
  96.   doit
  97. end mouseUp
  98.  
  99.  
  100.  
  101. -- part 3 (button)
  102. -- low flags: 00
  103. -- high flags: 8005
  104. -- rect: left=63 top=196 right=215 bottom=136
  105. -- title width / last selected line: 0
  106. -- icon id / first selected line: 0 / 0
  107. -- text alignment: 1
  108. -- font id: 0
  109. -- text size: 12
  110. -- style flags: 0
  111. -- line height: 16
  112. -- part name: Three
  113. ----- HyperTalk script -----
  114. on mouseUp
  115.   doit
  116. end mouseUp
  117.  
  118.  
  119.  
  120. -- part 4 (button)
  121. -- low flags: 00
  122. -- high flags: 8005
  123. -- rect: left=63 top=215 right=234 bottom=136
  124. -- title width / last selected line: 0
  125. -- icon id / first selected line: 0 / 0
  126. -- text alignment: 1
  127. -- font id: 0
  128. -- text size: 12
  129. -- style flags: 0
  130. -- line height: 16
  131. -- part name: Four
  132. ----- HyperTalk script -----
  133. on mouseUp
  134.   doit
  135. end mouseUp
  136.  
  137.  
  138.  
  139. -- part 5 (button)
  140. -- low flags: 00
  141. -- high flags: 8005
  142. -- rect: left=63 top=234 right=253 bottom=136
  143. -- title width / last selected line: 0
  144. -- icon id / first selected line: 0 / 0
  145. -- text alignment: 1
  146. -- font id: 0
  147. -- text size: 12
  148. -- style flags: 0
  149. -- line height: 16
  150. -- part name: Five
  151. ----- HyperTalk script -----
  152. on mouseUp
  153.   doit
  154. end mouseUp
  155.  
  156.  
  157.  
  158. -- part 6 (button)
  159. -- low flags: 00
  160. -- high flags: 8005
  161. -- rect: left=63 top=253 right=272 bottom=136
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 1
  165. -- font id: 0
  166. -- text size: 12
  167. -- style flags: 0
  168. -- line height: 16
  169. -- part name: Six
  170. ----- HyperTalk script -----
  171. on mouseUp
  172.   doit
  173. end mouseUp
  174.  
  175.  
  176.  
  177. -- part 7 (button)
  178. -- low flags: 00
  179. -- high flags: 8005
  180. -- rect: left=63 top=272 right=291 bottom=136
  181. -- title width / last selected line: 0
  182. -- icon id / first selected line: 0 / 0
  183. -- text alignment: 1
  184. -- font id: 0
  185. -- text size: 12
  186. -- style flags: 0
  187. -- line height: 16
  188. -- part name: Seven
  189. ----- HyperTalk script -----
  190. on mouseUp
  191.   doit
  192. end mouseUp
  193.  
  194.  
  195.  
  196. -- part 9 (field)
  197. -- low flags: 01
  198. -- high flags: 0000
  199. -- rect: left=20 top=56 right=153 bottom=503
  200. -- title width / last selected line: 0
  201. -- icon id / first selected line: 0 / 0
  202. -- text alignment: 0
  203. -- font id: 3
  204. -- text size: 12
  205. -- style flags: 0
  206. -- line height: 16
  207. -- part name: 
  208.  
  209.  
  210. -- part 10 (field)
  211. -- low flags: 01
  212. -- high flags: 0000
  213. -- rect: left=245 top=199 right=216 bottom=303
  214. -- title width / last selected line: 0
  215. -- icon id / first selected line: 0 / 0
  216. -- text alignment: 0
  217. -- font id: 3
  218. -- text size: 12
  219. -- style flags: 0
  220. -- line height: 16
  221. -- part name: 
  222.  
  223.  
  224. -- part 11 (field)
  225. -- low flags: 01
  226. -- high flags: 0000
  227. -- rect: left=251 top=220 right=247 bottom=290
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 65535
  231. -- font id: 3
  232. -- text size: 14
  233. -- style flags: 256
  234. -- line height: 18
  235. -- part name: score
  236.  
  237.  
  238. -- part 13 (field)
  239. -- low flags: 01
  240. -- high flags: 0001
  241. -- rect: left=337 top=190 right=264 bottom=477
  242. -- title width / last selected line: 0
  243. -- icon id / first selected line: 0 / 0
  244. -- text alignment: 1
  245. -- font id: 0
  246. -- text size: 12
  247. -- style flags: 0
  248. -- line height: 16
  249. -- part name: lose
  250.  
  251.  
  252. -- part 15 (button)
  253. -- low flags: 00
  254. -- high flags: 8005
  255. -- rect: left=63 top=291 right=310 bottom=136
  256. -- title width / last selected line: 0
  257. -- icon id / first selected line: 0 / 0
  258. -- text alignment: 1
  259. -- font id: 0
  260. -- text size: 12
  261. -- style flags: 0
  262. -- line height: 16
  263. -- part name: Eight
  264. ----- HyperTalk script -----
  265. on mouseUp
  266.   doit
  267. end mouseUp
  268.  
  269.  
  270.  
  271. -- part 16 (field)
  272. -- low flags: 81
  273. -- high flags: 2004
  274. -- rect: left=134 top=146 right=260 bottom=374
  275. -- title width / last selected line: 0
  276. -- icon id / first selected line: 0 / 0
  277. -- text alignment: 0
  278. -- font id: 3
  279. -- text size: 12
  280. -- style flags: 0
  281. -- line height: 16
  282. -- part name: Info
  283. ----- HyperTalk script -----
  284. on mouseUp
  285.   info
  286. end mouseUp
  287.  
  288.  
  289. -- part 17 (button)
  290. -- low flags: 00
  291. -- high flags: 2001
  292. -- rect: left=490 top=320 right=342 bottom=512
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 26635 / 26635
  295. -- text alignment: 1
  296. -- font id: 0
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: 
  301. ----- HyperTalk script -----
  302. on mouseUp
  303.   info
  304. end mouseUp
  305.  
  306.  
  307.  
  308. -- part contents for card part 9
  309. ----- text -----
  310. Your assignment, should you choose to accept it, is to get an 'X' in all of the boxes below.    Although this may sound simple, you will quickly be convinced otherwise.   Your success will depend on recognizing a pattern in the operation of the buttons.  Your score will depend on the number of clicks it takes you to get all the X's.
  311. Good luck!
  312.  
  313. -- part contents for card part 10
  314. ----- text -----
  315. Score:
  316.  
  317. -- part contents for card part 11
  318. ----- text -----
  319. 100
  320.  
  321. -- part contents for card part 16
  322. ----- text -----
  323.  
  324. A colleague of mine put this in here.  It doesn't really demonstrate anything, but I left it in for sentimental reasons.